1. Field of the Invention
The present invention relates to a system for establishing priority among a plurality of tasks stored within a queue.
2. Description of the Related Art
Within multiprocessor systems there is a need to control the assignment of tasks being generated by the various processors within the system. It is common for such systems to have a plurality of I/O channels over which tasks are communicated to various components of the system. Further, there may be a plurality of tasks waiting to be communicated over each of the I/O channels.
In some systems the number of I/O channels may be large such that the I/O channels are grouped together. Each group of I/O channels has a distinct group address and each I/O channel designated as a member of a group has a distinct member address within the group. Thus the individual I/O address is the combination of the group address and the member address for that I/O channel. The system therefore has the option of addressing I/O channels on a group basis, on an individual basis or on the basis of some combination of the group and member address for the I/O channels. Many approaches have been used to systematically service the plurality of tasks generated for a plurality of I/O channels or group of I/O channels.
Queues are used to store the tasks generated by the various components of the multiprocessor system. In one approach, the queue is a first in first out (FIFO) queue which will present the tasks in the order the tasks were received by the queue. However, a disadvantage of such an approach is that a plurality of tasks for one I/O channel might be consecutively stored by the queue causing the other I/O channels not to be serviced until all of the tasks for that one I/O channel have been serviced.
Another common approach is the use of a last in first out LIFO queue which allows the last task entered into the queue to be the next task assigned out of the queue. This approach has the obvious disadvantage that tasks stored earlier in the queue may not be serviced for a long period of time. This approach also has the disadvantages associated with the FIFO queue in that consecutive tasks can be stored for the same I/O channel therefore barring service to the other I/O channels within the system until those consecutive tasks are serviced.
Another approach is the assignment of a priority to tasks based on the function of the task. With this approach there is no assurance that tasks having low priority will ever be serviced.
Therefore, there is a need to have a priority system to assure that each of the I/O channels will be serviced and that each task for each I/O channel will be serviced in a timely fashion. Another requirement for such a priority system is to have the priority system perform this task while using a minimum amount of logic.